//
//  UIAlertControllerCustomer.h
//  UIAlerviewCustomer
//
//  Created by s on 16/6/12.
//  Copyright © 2016年 s. All rights reserved.
//

#import <UIKit/UIKit.h>
@class CMCCIOTIGAlertActionCustomer;
//弹出框 样式
typedef NS_ENUM(NSInteger, UIAlertControllerCustomStyle) {
    UIAlertControllerCustomStyleActionSheet = 0,
    UIAlertControllerCustomStyleAlert,
    UIAlertControllerCustomStyleVerticalStyle
} ;

typedef void (^ __nullable textFieldBLock)( UITextField * _Nullable textField) ;

@interface CMCCIOTIGAlertControlCustomer : UIView

@property(nonatomic,strong) UILabel   * _Nonnull lableMessage;
//返回UIAlertControllerCustomer  实例
+ (_Nonnull instancetype)alertControllerWithTitle:(NSString * _Nonnull )title message:( NSString * _Nonnull )message preferredStyle:(UIAlertControllerCustomStyle)preferredStyle;

//添加按钮
- (void)addAction:(CMCCIOTIGAlertActionCustomer *_Nonnull)action;
//添加textField
- (void)addTextFieldWithConfigurationHandler:(textFieldBLock)configurationHandler;
@property(nonatomic,assign)NSTextAlignment  messageAlignment;
@property(nonatomic,strong)NSMutableArray  *_Nonnull arrAlertAction;
-(void)reloadData;

@end


// UIAlertAction类

@interface CMCCIOTIGAlertActionCustomer : NSObject

//button  样式
typedef NS_ENUM(NSInteger, UIAlertActionCustomeStyle) {
    UIAlertActionCustomeStyleDefault = 0,
    UIAlertActionCustomeStyleCancel,
    UIAlertActionCustomeStyleDestructive,
    UIAlertActionCustomeStyleDarkGray,
    UIAlertActionCustomeStyleBlack
    
} ;


typedef void (^ __nullable alertActionBlock)( CMCCIOTIGAlertActionCustomer  * _Nullable   action)  ;

@property (nonatomic, strong)   NSString  *_Nonnull title;
@property (nonatomic, strong)   NSDictionary  *_Nonnull dicData;
@property (nonatomic, strong)   alertActionBlock alertActionBlock;
@property (nonatomic, assign)   UIAlertActionCustomeStyle  alertActionStyle;
@property (nonatomic, strong)     NSMutableArray  *_Nonnull textFields;  //存储textField
@property(nonatomic,assign) BOOL  isSelect;  // 是否选中
@property(nonatomic,strong) id    _Nonnull userInfo;  // 是否选中

+ (_Nonnull instancetype)actionCustomerWithTitle:( NSString *_Nonnull)title style:(UIAlertActionCustomeStyle )style handler:(alertActionBlock)handler;


@end
